package com.challenge.smsservice.studentmanage.service.impl;

import com.challenge.smsbase.Service.impl.GenericManagerImpl;
import com.challenge.smsdao.studentmanage.dao.StudentDao;
import com.challenge.smsdao.studentmanage.domain.Student;
import com.challenge.smsservice.studentmanage.service.StudentManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * shaoyunfei
 */
@Component
public class StudentManagerImpl extends GenericManagerImpl<Student,Long> implements StudentManager {
    StudentDao studentDao;

    /**
     * setStudentDao
     * @param studentDao
     */
    @Autowired
    public void setStudentDao(StudentDao studentDao){
        this.studentDao = studentDao;
        this.dao = this.studentDao;
    }

    /**
     * findByNumber
     * @param number
     * @return
     */
    @Override
    public Student findByNumber(String number) {
        return studentDao.findByNumber(number);
    }
}
